New Functions in Week 9

droplevels

{base}

Drop Unused Levels from Factors

levels

{base}

Get levels of a factor

median

{stats}

Get median of a vector

ifelse

{base}

Return a or b depending on the value of test

relevel

{stats}

Set a reference level for a factor variable

log

{base}

log (default base = e)

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

as.factor

{base}

Coerce a vector to factor

sapply

{base}

Apply a function over a vector or list and simplify the result

fct_relevel

{forcats}

Reorder factor levels by hand

The end!